package com.sky.loveshop.mapper;

import com.sky.loveshop.entity.Product;
import com.sky.loveshop.entity.qo.ProductQO;
import com.sky.loveshop.entity.vo.ProductVO;
import com.sky.loveshop.utils.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xcy
 * @version V1.0
 * @description
 * @date 2024/8/18 0:07
 */
public interface ProductMapper extends MyMapper<Product> {

    List<ProductVO> searchAll(ProductQO productQO);

    Product getProductById(@Param("id") Integer id);

    List<Product> getProductsByIds(@Param("ids") List<Integer> ids);

    Integer delProductById(@Param("id") Integer id);

    Integer updateProductById(Product product);

    Integer insertOne(Product product);

    List<ProductVO> getProductsByUpcList(@Param("upcList") List<String> upcList);

    List<Integer> getProductIdsByName(@Param("productName") String productName);
}
